From 18fb9bcd5356221120a87ba33832ed3d95c2e026 Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Wed, 17 Jan 2001 21:32:34 +0000 Subject: [PATCH] Set the attributes onto the PangoLayout even if they are newly created Wed Jan 17 16:22:54 2001 Owen Taylor * gtk/gtklabel.c (gtk_label_size_request): Set the attributes onto the PangoLayout even if they are newly created from label->pattern. --- ChangeLog | 6 ++++++ ChangeLog.pre-2-0 | 6 ++++++ ChangeLog.pre-2-10 | 6 ++++++ ChangeLog.pre-2-2 | 6 ++++++ ChangeLog.pre-2-4 | 6 ++++++ ChangeLog.pre-2-6 | 6 ++++++ ChangeLog.pre-2-8 | 6 ++++++ gtk/gtklabel.c | 19 +++++++++++-------- 8 files changed, 53 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index eb7f64a9c3..1bdaddba80 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Wed Jan 17 16:22:54 2001 Owen Taylor + + * gtk/gtklabel.c (gtk_label_size_request): Set the + attributes onto the PangoLayout even if they are newly + created from label->pattern. + Tue Jan 9 11:20:48 2001 Owen Taylor * gdk/x11/gdkdnd-x11.c: Remove unused variable. diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index eb7f64a9c3..1bdaddba80 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,9 @@ +Wed Jan 17 16:22:54 2001 Owen Taylor + + * gtk/gtklabel.c (gtk_label_size_request): Set the + attributes onto the PangoLayout even if they are newly + created from label->pattern. + Tue Jan 9 11:20:48 2001 Owen Taylor * gdk/x11/gdkdnd-x11.c: Remove unused variable. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index eb7f64a9c3..1bdaddba80 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +Wed Jan 17 16:22:54 2001 Owen Taylor + + * gtk/gtklabel.c (gtk_label_size_request): Set the + attributes onto the PangoLayout even if they are newly + created from label->pattern. + Tue Jan 9 11:20:48 2001 Owen Taylor * gdk/x11/gdkdnd-x11.c: Remove unused variable. diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index eb7f64a9c3..1bdaddba80 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,9 @@ +Wed Jan 17 16:22:54 2001 Owen Taylor + + * gtk/gtklabel.c (gtk_label_size_request): Set the + attributes onto the PangoLayout even if they are newly + created from label->pattern. + Tue Jan 9 11:20:48 2001 Owen Taylor * gdk/x11/gdkdnd-x11.c: Remove unused variable. diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index eb7f64a9c3..1bdaddba80 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,9 @@ +Wed Jan 17 16:22:54 2001 Owen Taylor + + * gtk/gtklabel.c (gtk_label_size_request): Set the + attributes onto the PangoLayout even if they are newly + created from label->pattern. + Tue Jan 9 11:20:48 2001 Owen Taylor * gdk/x11/gdkdnd-x11.c: Remove unused variable. diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index eb7f64a9c3..1bdaddba80 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,9 @@ +Wed Jan 17 16:22:54 2001 Owen Taylor + + * gtk/gtklabel.c (gtk_label_size_request): Set the + attributes onto the PangoLayout even if they are newly + created from label->pattern. + Tue Jan 9 11:20:48 2001 Owen Taylor * gdk/x11/gdkdnd-x11.c: Remove unused variable. diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index eb7f64a9c3..1bdaddba80 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +Wed Jan 17 16:22:54 2001 Owen Taylor + + * gtk/gtklabel.c (gtk_label_size_request): Set the + attributes onto the PangoLayout even if they are newly + created from label->pattern. + Tue Jan 9 11:20:48 2001 Owen Taylor * gdk/x11/gdkdnd-x11.c: Remove unused variable. diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c index c5f7883b53..17036974e2 100644 --- a/gtk/gtklabel.c +++ b/gtk/gtklabel.c @@ -513,15 +513,18 @@ gtk_label_size_request (GtkWidget *widget, * permanently, and just modifes or creates the AttrList */ if (label->attrs) - { - attrs = pango_attr_list_copy (label->attrs); - pango_layout_set_attributes (label->layout, attrs); - } - else + attrs = pango_attr_list_copy (label->attrs); + else if (label->pattern) attrs = pango_attr_list_new (); - - gtk_label_pattern_to_attrs (label, attrs); - pango_attr_list_unref (attrs); + + if (label->pattern) + gtk_label_pattern_to_attrs (label, attrs); + + if (attrs) + { + pango_layout_set_attributes (label->layout, attrs); + pango_attr_list_unref (attrs); + } switch (label->jtype) { -- 2.30.2